package com.khtn.org.data;

import static org.junit.Assert.*;

import java.io.IOException;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.junit.Test;

import com.org.khtn.data.Data;
import com.org.khtn.data.DataTables;

public class DataTablesTest extends TestCase{

	@Test
	public void testTableExist() {
		DataTables a = new DataTables(new Data("qlhs", "hocsinh", "MYtest\\data\\"));
		Assert.assertNotSame(a.tableExist("time"),-1);
		

	}

	@Test
	public void testFieldExist() {
		DataTables a = new DataTables(new Data("qlhs", "hocsinh", "MYtest\\data\\"));
	Assert.assertFalse(a.fieldExist("name","timer"));
		Assert.assertTrue(a.fieldExist("address","time"));
		Assert.assertTrue(a.fieldExist("name","hocsinh"));
		
	}

}
